﻿@{
    ViewBag.Title = "专家库列表";
    Layout = "~/Views/Shared/ExpertManage/_Layout_ExpertManage.cshtml";
}
@Styles.Render("~/Scripts/ztree/zTreeStyle.css")
@Scripts.Render("~/Scripts/ztree/jquery.ztree.all-3.5.min.js")
<script type="text/javascript" src="@Url.Content("~/Scripts/jQuery.tmpl.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/Expert/Expert.js")"></script>
<!-- 数据表格的模板 -->
<script id="DataTemplate" type="text/html">
                <tr>
                    <td style="padding: .5em;" class="ui-state-default">{{= rowIDX }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Name }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Mobile }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= TeleWork }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Professional }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Title }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Company }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Categorys }}
                    </td>
                    <td style="padding: .5em;" class="ui-state-default">{{= Attachments }}
                    </td>
                    <td style="padding: .5em; text-align: center; white-space:nowrap;" class="ui-state-default">
                        [<a href="@Url.Content("~/ExpertManage/Edit?id="){{= ID }}" target="_blank">修改</a>]<br />
                        [<a href="@Url.Content("~/ExpertManage/Stop?id="){{= ID }}">停用</a>]<br />
                        [<a href="@Url.Content("~/ExpertManage/Recommend?id="){{= ID }}">推荐表</a>]<br />
                        [<a href="@Url.Content("~/ExpertManage/Attachment?id="){{= ID }}" target="_blank">专家复印件</a>]
                    </td>
                </tr>
</script>
<!-- 启动时初始化变量以及树形菜单配置参数 -->
<script type="text/javascript">
    //树形分类的配置项目
    var setting = {
        view: {
            selectedMulti: false
        },
        check: {
            chkboxType: { "Y": "ps", "N": "ps" },
            enable: true
        },
        data: {
            simpleData: {
                enable: true
            }
        },
        callback: {
            //onClick: onClick
        }
    };

    //定义查询条件的JSON对象
    var objQuery = new Object;
    objQuery.qName = "";
    objQuery.qProfessional = "";
    objQuery.qStatus = "在用";
    objQuery.qCategoryIDs = "";
    //分页用到的参数
    objQuery.recordCount = 0;
    objQuery.pageCount = 0;
    objQuery.pageSize = 10;
    objQuery.pageIndex = 0;

    $(document).ready(function () {
        //初始化专家分类树形
        getCategorys('@Url.Content("~/Extract/getCategorysJson")');
    });

    //定义查询专家的地址
    var strUrlgetExperts = '@Url.Content("~/ExpertManage/getExperts")';
</script>
<h2>@ViewBag.Title</h2>
<div class="ui-widget-content ui-corner-all" style="padding: 0.7em;">
    <!-- 查询条件 -->
    <div style="position: relative; width: 50%; float: left;">
        <div class="ui-widget-header ui-corner-all" style="padding: 0.7em;">
            <b>专家分类：</b></div>
        <div class="ui-widget-content ui-corner-all" style="padding: 0.7em;">
            <div style="margin-right: 0; padding: 0.3em; height: 200px; overflow: scroll; background-color: #fff;">
                <ul id="treeCategory" class="ztree">
                </ul>
            </div>
        </div>
    </div>
    <div style="position: relative; margin-left: 50%; overflow: hidden;">
        <div class="ui-corner-all">
            <div style="overflow: hidden;">
                <div style="position: relative; width: 40%; float: left;">
                    <div class="ui-widget-header ui-corner-all" style="position: relative; padding: 0.7em;">
                        <b>姓名：</b>
                    </div>
                </div>
                <div style="position: relative; margin-left: 40%; overflow: hidden;">
                    <div style="padding: 0.7em;">
                        <input id="qName" type="text" />
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div style="overflow: hidden;">
                <div style="position: relative; width: 40%; float: left;">
                    <div class="ui-widget-header ui-corner-all" style="position: relative; padding: 0.7em;">
                        <b>专业：</b>
                    </div>
                </div>
                <div style="position: relative; margin-left: 40%; overflow: hidden;">
                    <div style="padding: 0.7em;">
                        <input id="qProfessional" type="text" />
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div style="overflow: hidden;">
                <div style="position: relative; width: 40%; float: left;">
                    <div class="ui-widget-header ui-corner-all" style="position: relative; padding: 0.7em;">
                        <b>单位：</b>
                    </div>
                </div>
                <div style="position: relative; margin-left: 40%; overflow: hidden;">
                    <div style="padding: 0.7em;">
                        <input id="qCompany" type="text" />
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div style="overflow: hidden;">
                <div style="position: relative; width: 40%; float: left;">
                    <div class="ui-widget-header ui-corner-all" style="position: relative; padding: 0.7em;">
                        <b>状态：</b>
                    </div>
                </div>
                <div style="position: relative; margin-left: 40%; overflow: hidden;">
                    <div style="padding: 0.7em;">
                        <select id="qStatus">
                            <option selected="selected" value="在用">在用</option>
                            <option value="停用">停用</option>
                        </select>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="ui-widget-content ui-corner-all" style="padding: 0.7em; text-align: center;">
                <a class="btn" href="javascript:doQuery();">查询</a>
                @Html.ActionLink("新注册", "Regist", null, new { @class = "btn" })
            </div>
        </div>
    </div>
    <div class="splid">
    </div>
    <table style="border-collapse: collapse; width: 100%;">
        <thead>
            <tr>
                <th class="ui-widget-header" style="padding: .5em; white-space:nowrap;">
                    序号
                </th>
                <th class="ui-widget-header" style="padding: .5em; white-space:nowrap;">
                    姓名
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    手机号码
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    固定电话
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    专业
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    职称
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    工作单位
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    所属分类
                </th>
                <th class="ui-widget-header" style="padding: .5em;">
                    附件
                </th>
                <th class="ui-widget-header" style="padding: .5em; white-space:nowrap;">
                    操作
                </th>
            </tr>
        </thead>
        <tbody id="tableDatas">
        </tbody>
    </table>
    <p>
        [<a href="javascript:go_p();">上一页</a>]&nbsp;&nbsp;&nbsp;&nbsp;[<a href="javascript:go_n();">下一页</a>]&nbsp;&nbsp;&nbsp;&nbsp;
        第
        <input type="text" style="width: 20px;" id="pageGO" value="1" />
        页 /共 <span id="pageCount"></span>页&nbsp;&nbsp;[<a href="javascript:go();">GO</a>]</p>
</div>
